<?php
namespace App\Api\Order;

use PhalApi\Api;
use App\Domain\Order\OrderDomain;
use App\Common\MyApi;

/**
 * Order
 * @author dogstar 20170612
 */

class Order extends MyApi {

    public function getRules() {
        return array(
            'index' => array(
                'id' => array('name' => 'id', 'type' => 'int', 'require' => true, 'desc' => '', 'source' => 'get'),
            ),
        );
    }

    /**
     * 运动
     * @desc 运动列表
     * @return int id 新增的ID
     */
    public function index() {
        $res = array();
        $param = array('id' => $this->id);
        $domain = new OrderDomain();
        $id = $domain->add($param);
        $res= array('id' => 1);
        //return $this->output($res);
        return $res;
    }
}
